//
//  AXMyAddressSelectCell.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/11/8.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "AXMyAddressSelectCell.h"

@implementation AXMyAddressSelectCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self creatView];
        [self setlayout];
    }
    return self;
    
}


- (void)creatView {
    
    self.titleLabel = [[UILabel alloc]init];
    self.titleLabel.font = FONT_FOURTEEN;
    self.titleLabel.textColor = COLOR_DIV;
    [self.contentView addSubview:self.titleLabel];
    
    
    self.addressBtn = [[UIButton alloc]init];
    [self.addressBtn setTitleColor:COLOR_Gray forState:UIControlStateNormal];
    [self.addressBtn addTarget:self action:@selector(select:) forControlEvents:UIControlEventTouchUpInside];
    self.addressBtn.titleLabel.font = FONT_FOURTEEN;
    [self.contentView addSubview:self.addressBtn];
    
  
    
    
}

- (void)setlayout {
    
    self.titleLabel.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 0)
    .widthIs(120)
    .heightIs(44);
    
    self.addressBtn.sd_layout
    .rightSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 0)
    .widthIs(200)
    .heightIs(44);
    
   
    
}


- (void)select:(UIButton *)btn {
  
    if (self.tapButtonClickedBlock) {
        
        self.tapButtonClickedBlock(btn.tag);
    }
    
}



@end
